package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxfw_man;
import cn.bj.dao.Yxfw_manMapper;

@Service
public class ManService {
	@Autowired
	Yxfw_manMapper yxfw_manMapper;

	// 查询所有
	public List<Yxfw_man> getAllCandys() {
		return yxfw_manMapper.selectByExample(null);
	}

	// 插入
	public int insertMan(Yxfw_man man) {
		return yxfw_manMapper.insert(man);
	}

	// 删除
	public int deleteMan(Integer id) {
		return yxfw_manMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxfw_man selectById(Integer id) {
		return yxfw_manMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateMan(Yxfw_man man) {
		return yxfw_manMapper.updateByPrimaryKey(man);
	}

}
